/*
 * FramePreguntasTecnico.java
 *
 * Created on 27 de mayo de 2009, 23:49
 */

package GUI;


import java.io.FileNotFoundException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import jess.JessException;

/**
 *
 * @author  David
 */
public class FramePreguntasTecnico extends JFrame {
    
    private JFrame framePadre;

    /** Creates new form FramePreguntasTecnico */
    public FramePreguntasTecnico(JFrame fr) {
        this.setVisible(true);
        this.framePadre=fr;
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel_AsesoramientoTecnico = new javax.swing.JLabel();
        jComboBox_Preguntas = new javax.swing.JComboBox();
        jButton_Volver = new javax.swing.JButton();
        jButton_Asesorar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel_AsesoramientoTecnico.setText("Asesoramiento Técnico");

        jComboBox_Preguntas.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Jornada, Salario y tipo Empresa", "Plantilla de curriculum", "Donde buscar informacion", "Consejos para su curriculum" }));

        jButton_Volver.setText("Volver");
        jButton_Volver.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_VolverActionPerformed(evt);
            }
        });

        jButton_Asesorar.setText("Asesorar");
        jButton_Asesorar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_AsesorarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(155, Short.MAX_VALUE)
                .addComponent(jLabel_AsesoramientoTecnico)
                .addGap(135, 135, 135))
            .addGroup(layout.createSequentialGroup()
                .addGap(82, 82, 82)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButton_Volver)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jButton_Asesorar))
                    .addComponent(jComboBox_Preguntas, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(58, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(45, 45, 45)
                .addComponent(jLabel_AsesoramientoTecnico)
                .addGap(18, 18, 18)
                .addComponent(jComboBox_Preguntas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(72, 72, 72)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton_Volver)
                    .addComponent(jButton_Asesorar))
                .addContainerGap(108, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void jButton_VolverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_VolverActionPerformed
   
    this.setVisible(false);     
    this.framePadre.setVisible(true);
}//GEN-LAST:event_jButton_VolverActionPerformed

private void jButton_AsesorarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_AsesorarActionPerformed
    int indice =jComboBox_Preguntas.getSelectedIndex();
    switch ( indice ) {
      case 0:           
        try {
            this.setVisible(false);
            JFrame fram = new FramePreguntaTecnico1(this);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(FramePreguntasTecnico.class.getName()).log(Level.SEVERE, null, ex);
        }          
        break;
      case 1:
        try {
            this.setVisible(false);
            JFrame fram = new Plantillas(this);
        } catch (JessException ex) {
            Logger.getLogger(FramePreguntasTecnico.class.getName()).log(Level.SEVERE, null, ex);
        }        
           break;
        case 2:{
            this.setVisible(false);
            JFrame fram = new DondBuscar(this);
        }
           break;
      case 3:{
            this.setVisible(false);
            JFrame fram = new CV(this);
        }
                //
           break;
      default:
           System.out.println("error" );
           break;
      }
}//GEN-LAST:event_jButton_AsesorarActionPerformed

    /**
    * @param args the command line arguments
    */
   

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton_Asesorar;
    private javax.swing.JButton jButton_Volver;
    private javax.swing.JComboBox jComboBox_Preguntas;
    private javax.swing.JLabel jLabel_AsesoramientoTecnico;
    // End of variables declaration//GEN-END:variables

}
